/*
 * AgentInoVo.java
 * classes : com.homelink.model.bean.AgentInoVo
 * @author panwei
 * V 1.0.0
 * Create at 2015-8-17 下午5:19:39
 */
package link.model;

import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.Expose;
import java.io.Serializable;

/**
 * 经纪人信息
 */
public class AgentInfoVo implements Parcelable, Serializable {

  public static final String TAG = "AgentInoVo";

  public static final Creator<AgentInfoVo> CREATOR = new Creator<AgentInfoVo>() {
    @Override public AgentInfoVo createFromParcel(Parcel source) {
      return new AgentInfoVo(source);
    }

    @Override public AgentInfoVo[] newArray(int size) {
      return new AgentInfoVo[size];
    }
  };
  /**
   * 工号
   */
  @Expose public String usercode;
  /**
   * 唯一标识
   */
  @Expose public String id;
  /**
   * 姓名
   */
  @Expose public String name;
  /**
   * 性别  M：男 F：女
   */
  @Expose public String sex;
  /**
   * 手机电话
   */
  @Expose public String mobile;
  /**
   * 家庭电话
   */
  @Expose public String homePhone;
  /**
   * 公司电话
   */
  @Expose public String compPhone;
  /**
   * 头像
   */
  @Expose public String avatar;
  /**
   * 店组名称
   */
  @Expose public String orgName;
  /**
   * 职称编码（761买卖，784租赁，785综合经纪人，其他为独立新房经纪人类型，二手不做考虑）
   * 10000 10001 A
   * 10002 M
   * 10003 S
   * 10004 D
   * 10005 C
   */
  @Expose public String positionCode;
  /**
   * 商圈经理、买卖经纪人、营销区经理（对positionCode的解释） 职称
   */
  @Expose public String positionName;
  /**
   * 级别
   */
  @Expose public String level;
  /**
   * 公司编号
   */
  @Expose public String compCode;
  /**
   * 城市编码
   */
  @Expose public String cityCode;
  /**
   * 城市名字
   */
  @Expose public String cityName;
  /**
   * 城市上线时间，4期读本地，后期接口添加
   */
  public long cityOnLineTime;
  /**
   * 1：链家体系员工；2：链家网用户
   */
  @Expose public int type;
  /**
   * 消息设置
   */
  @Expose public PushSettingVo setting;
  /**
   * 是否选中陪看 本地字段，非服务器返回
   */
  @Expose public boolean isAccompany;
  /**
   * 判断是否在线
   */
  @Expose public int isOnline;
  /**
   * 是否是经纪人本人 null或false 不是 true 是本人
   */
  public boolean self;
  /**
   * 邮箱
   */
  public String email;
  /**
   * 补充信息
   */
  public String addInfo;
  /**
   * 屏蔽状态 true 屏蔽 false或null未屏蔽
   */
  public boolean blockStatus;
  /**
   * 1 未被标记过同业
   * 2 被标记过 ，但是登陆人没标记过
   * 3 被标记过，登陆人也标记了
   */
  public int vocationType;
  /**
   * 是否可以操作取消同业
   */
  public boolean unMarkVocation;
  /**
   * 打星号电话号
   */
  public String displayMobile;
  /**
   * 第一次聊天时间
   */
  public String firstChatTime;
  /**
   * 备注
   */
  public String remark;

  // 新房的
  /**
   * true: 可以修改头像, false: 不能修改头像,新房暂时没有这个字段
   */
  @Expose public boolean isModifyAvatar = true;
  /**
   * 带看次数
   */
  @Expose public String showCnt;

  public AgentInfoVo() {
  }

  protected AgentInfoVo(Parcel in) {
    this.usercode = in.readString();
    this.id = in.readString();
    this.name = in.readString();
    this.sex = in.readString();
    this.mobile = in.readString();
    this.homePhone = in.readString();
    this.compPhone = in.readString();
    this.avatar = in.readString();
    this.orgName = in.readString();
    this.positionCode = in.readString();
    this.positionName = in.readString();
    this.level = in.readString();
    this.compCode = in.readString();
    this.cityCode = in.readString();
    this.cityName = in.readString();
    this.cityOnLineTime = in.readLong();
    this.type = in.readInt();
    this.setting = (PushSettingVo) in.readSerializable();
    this.isAccompany = in.readByte() != 0;
    this.isOnline = in.readInt();
    this.self = in.readByte() != 0;
    this.email = in.readString();
    this.addInfo = in.readString();
    this.blockStatus = in.readByte() != 0;
    this.vocationType = in.readInt();
    this.unMarkVocation = in.readByte() != 0;
    this.displayMobile = in.readString();
    this.firstChatTime = in.readString();
    this.remark = in.readString();
    this.isModifyAvatar = in.readByte() != 0;
    this.showCnt = in.readString();
  }

  @Override public int describeContents() {
    return 0;
  }

  @Override public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.usercode);
    dest.writeString(this.id);
    dest.writeString(this.name);
    dest.writeString(this.sex);
    dest.writeString(this.mobile);
    dest.writeString(this.homePhone);
    dest.writeString(this.compPhone);
    dest.writeString(this.avatar);
    dest.writeString(this.orgName);
    dest.writeString(this.positionCode);
    dest.writeString(this.positionName);
    dest.writeString(this.level);
    dest.writeString(this.compCode);
    dest.writeString(this.cityCode);
    dest.writeString(this.cityName);
    dest.writeLong(this.cityOnLineTime);
    dest.writeInt(this.type);
    dest.writeSerializable(this.setting);
    dest.writeByte(this.isAccompany ? (byte) 1 : (byte) 0);
    dest.writeInt(this.isOnline);
    dest.writeByte(this.self ? (byte) 1 : (byte) 0);
    dest.writeString(this.email);
    dest.writeString(this.addInfo);
    dest.writeByte(this.blockStatus ? (byte) 1 : (byte) 0);
    dest.writeInt(this.vocationType);
    dest.writeByte(this.unMarkVocation ? (byte) 1 : (byte) 0);
    dest.writeString(this.displayMobile);
    dest.writeString(this.firstChatTime);
    dest.writeString(this.remark);
    dest.writeByte(this.isModifyAvatar ? (byte) 1 : (byte) 0);
    dest.writeString(this.showCnt);
  }
}
